package com.jl.jlapp.adapter;

import android.graphics.Color;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;

import java.util.Iterator;
import java.util.List;

public class SideslipBrandAdapter
  extends BaseQuickAdapter<String, BaseViewHolder>
{
  List<String> chechedName;
  
  public SideslipBrandAdapter(@LayoutRes int paramInt, @Nullable List<String> paramList)
  {
    super(paramInt, paramList);
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, String paramString)
  {
    paramBaseViewHolder.setText(R.id.brand_name, paramString);
    TextView localTextView = (TextView)paramBaseViewHolder.getView(R.id.brand_name);
    RelativeLayout localRelativeLayout = (RelativeLayout)paramBaseViewHolder.getView(R.id.check_brand_relativelayout);
    ImageView ivCheckmack = (ImageView)paramBaseViewHolder.getView(R.id.brand_checkmark);
    localRelativeLayout.setBackgroundResource(R.drawable.goods_check_button_xs);
    ivCheckmack.setVisibility(View.GONE);
    localTextView.setTextColor(Color.parseColor("#333333"));
    if (this.chechedName != null)
    {
      Log.e(TAG, "chechedName:" + this.chechedName.size());
      Iterator localIterator = this.chechedName.iterator();
      while (localIterator.hasNext()) {
        if (paramString == (String)localIterator.next())
        {
          localRelativeLayout.setBackgroundResource(R.drawable.goods_check_button_xs_checked);
          ivCheckmack.setVisibility(View.VISIBLE);
          localTextView.setTextColor(Color.parseColor("#60b746"));
        }
      }
    }
  }
  
  public void setChechedName(List<String> paramList)
  {
    this.chechedName = paramList;
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/SideslipBrandAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */